var ajaxHelper = require("../../utils/ajaxhelp");
const serviceUrl = getApp().globalData.serviceUrl;
let token = wx.getStorageSync('token');

const GetScreenTemplateData = () => {
	token = wx.getStorageSync('token');
	return ajaxHelper.promiseRequst(serviceUrl + "/api/ScreenTemplate/Get", {
		'Authorization': 'Bearer ' + token
	}, "GET", null)
}

const GetCategorIdByTmeplateId = (templateid) => {
	token = wx.getStorageSync('token');
	return ajaxHelper.promiseRequst(serviceUrl + "/api/Category/GetCategorIdByTmeplateId", {
		'Authorization': 'Bearer ' + token
	}, "GET", {
		templateid: templateid
	})
}


module.exports = {
	GetScreenTemplateData,
	GetCategorIdByTmeplateId
}
